package com.szrt.day20170418.ch06.integer;


import org.junit.Test;

public class IntegerTest {
	
	@Test
	public void integerTest05() throws Exception {
		
		//自动拆箱：  将封装类型自动转换成对应简单类型
		int i01=new Integer(200);
		
		//Integer i01=new Integer(200);
		//int aa =i01;
		
	}
	@Test
	public void integerTest04() throws Exception {
		Integer i01=200;   //自动装箱
		//Integer i01=new Integer(200);
		
	}
	@Test
	public void integerTest03() throws Exception {
		
		String v1="100";
		//逆向思维：先去试 后面发现规律  2 8 18 后面的参数表示多少进制
		int v11 =Integer.parseInt(v1,10);
		System.out.println(v11);
		
		
	}
	@Test
	public void integerTest02() throws Exception {
		
		String v1="100";
		int v11 =Integer.parseInt(v1);
		String v2="aa";
		int v22 = Integer.parseInt(v2);
		System.out.println(v1+v2);
		System.out.println(v11+v22);
		
		
	}
	@Test
	public void integerTest01() throws Exception {
		Integer integer = new Integer(18);
		int v = integer.intValue();
		System.out.println(v);
		
	}

}
